home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3518 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  32 lines

  1. In a message of 16 Feb 96 Marcus Alanen wrote to All:
  2.  
  3.  >> Now to cycle I use the following code:
  4.  
  5.  MA>     which I understand little of... Anyway, is there any possibility
  6.  MA>     to use *two* palettes one after another that are identical?
  7.  MA>     Like this: (number represents colour register, X position
  8.  MA>     is the "address")
  9.  
  10.  MA>               111111          111111
  11.  MA>     01234567890123450123456789012345
  12.  
  13.  
  14.  MA>     So that you do a Palette() call from the beginning (x=0)
  15.  MA>     and then after each cycle add a constant to x, so that
  16.  MA>     the next Palette() information is taken from the address
  17.  MA>     x=2 or something like that.
  18.  
  19. That's exactly what I was trying with my original SetRGB32() code. I had memory
  20. allocated to hold *2* copies of the palette, and to cycle I could just move the
  21. pointer of the start colour instead of having to shift all the colour data
  22. itself.
  23.  
  24. However, with LoadRGB32() it's a little more difficult, since the first
  25. longword of the data always has to contain the number of colours to be set, and
  26. the number of the first colour. The list also has to be terminated by following
  27. it with another list with a colours-to-be-set value of zero. So it gets a bit
  28. more complicated, but still quite do-able. :)
  29.  
  30. .\dam.          [Team AMIGA]          //\ ad32@brighton.ac.uk \\/
  31.  
  32.